home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / MPI_Scatter.z / MPI_Scatter
Encoding:
Text File  |  2002-10-03  |  4.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. MMMMPPPPIIII____SSSSCCCCAAAATTTTTTTTEEEERRRR((((3333))))                                                  MMMMPPPPIIII____SSSSCCCCAAAATTTTTTTTEEEERRRR((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      MMMMPPPPIIII____SSSSccccaaaatttttttteeeerrrr - Sends data from one task to all other tasks in a group
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      C:
  13.  
  14.           #include <mpi.h>
  15.  
  16.           int MPI_Scatter ( _s_e_n_d_b_u_f, _s_e_n_d_c_n_t, _s_e_n_d_t_y_p_e,
  17.           _r_e_c_v_b_u_f, _r_e_c_v_c_n_t, _r_e_c_v_t_y_p_e, _r_o_o_t, _c_o_m_m )
  18.           void             *_s_e_n_d_b_u_f;
  19.           int               _s_e_n_d_c_n_t;
  20.           MPI_Datatype      _s_e_n_d_t_y_p_e;
  21.           void             *_r_e_c_v_b_u_f;
  22.           int               _r_e_c_v_c_n_t;
  23.           MPI_Datatype      _r_e_c_v_t_y_p_e;
  24.           int               _r_o_o_t;
  25.           MPI_Comm          _c_o_m_m;
  26.  
  27.  
  28.      C++:
  29.  
  30.           #include <mpi.h>
  31.  
  32.           void Intracomm::Scatter(
  33.           const void*       _s_e_n_d_b_u_f,
  34.           int               _s_e_n_d_c_o_u_n_t,
  35.           const Datatype&   _s_e_n_d_t_y_p_e,
  36.           void*             _r_e_c_v_b_u_f,
  37.           int               _r_e_c_v_c_o_u_n_t,
  38.           const Datatype&   _r_e_c_v_t_y_p_e,
  39.           int               _r_o_o_t) const
  40.  
  41.  
  42.      Fortran:
  43.  
  44.           INCLUDE "mpif.h" (or USE MPI)
  45.  
  46.           <type> SENDBUF(*), RECVBUF(*)
  47.           INTEGER _s_e_n_d_c_o_u_n_t, _s_e_n_d_t_y_p_e, _r_e_c_v_c_o_u_n_t, _r_e_c_v_t_y_p_e, _r_o_o_t, _c_o_m_m,
  48.           _i_e_r_r_o_r
  49.  
  50.           CALL MPI_SCATTER(_s_e_n_d_b_u_f, _s_e_n_d_c_o_u_n_t, _s_e_n_d_t_y_p_e, _r_e_c_v_b_u_f,
  51.           _r_e_c_v_c_o_u_n_t, _r_e_c_v_t_y_p_e, _r_o_o_t, _c_o_m_m, _i_e_r_r_o_r)
  52.  
  53.  
  54. SSSSTTTTAAAANNNNDDDDAAAARRRRDDDDSSSS
  55.      This release implements the MPI 1.2 standard, as documented by the MPI
  56.      Forum in the spring 1997 release of _M_P_I:  _A _M_e_s_s_a_g_e _P_a_s_s_i_n_g _I_n_t_e_r_f_a_c_e
  57.      _S_t_a_n_d_a_r_d.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MMMMPPPPIIII____SSSSCCCCAAAATTTTTTTTEEEERRRR((((3333))))                                                  MMMMPPPPIIII____SSSSCCCCAAAATTTTTTTTEEEERRRR((((3333))))
  71.  
  72.  
  73.  
  74. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  75.      The MMMMPPPPIIII____SSSSccccaaaatttttttteeeerrrr routine sends data from one task to all other tasks in a
  76.      group.  This routine accepts the following parameters:
  77.  
  78.      _s_e_n_d_b_u_f        Specifies the address of the send buffer (choice,
  79.                     significant only at root)
  80.  
  81.      _s_e_n_d_c_n_t        Specifies the number of elements sent to each process
  82.                     (integer, significant only at root)
  83.  
  84.      _s_e_n_d_t_y_p_e       Specifies the data type of the send buffer elements
  85.                     (significant only at root) (handle)
  86.  
  87.      _r_e_c_v_c_n_t        Specifies the number of elements in the receive buffer
  88.                     (integer)
  89.  
  90.      _r_e_c_v_t_y_p_e       Specifies the data type of the receive buffer elements
  91.                     (handle)
  92.  
  93.      _r_o_o_t           Specifies the rank of the sending process (integer)
  94.  
  95.      _c_o_m_m           Specifies the communicator (handle)
  96.  
  97.      _r_e_c_v_b_u_f        Returns the address of the receive buffer (choice)
  98.  
  99.      _i_e_r_r_o_r         Specifies the return code value for successful completion,
  100.                     which is in MPI_SUCCESS.  MPI_SUCCESS is defined in the
  101.                     mmmmppppiiiiffff....hhhh file.
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.